<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>品牌管理</title>
    <link rel="stylesheet" href="http://localhost/jumei/Static/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="http://localhost/jumei/Static/hdjs/hdjs.css">
    <script type="text/javascript" src="http://localhost/jumei/Static/js/jquery-1.7.2.min.js"></script>
</head>
<body>
<div class="wrap">
    <div class="hd-title-header">修改品牌</div>
    <form action="" method="post" class="form-inline hd-form" enctype="multipart/form-data">
        <table class="hd-table hd-table-list">
            <tr>
                <th class="w100">品牌名称</th>
                <td  class="w100">
                    <input type="text" name="bname" class="w200" value="<?php echo $data['bname'];?>" />
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">品牌排序</th>
                <td>
                    <input type="text" name="sort" class="w200" value="<?php echo $data['sort'];?>"/>
                </td>
                <td>请填写1到65535的排序数字 </td>
            </tr>
            <tr>
                <th class="w100">品牌LOGO</th>
                <td id="logo-td">
                        <?php if($data['logo']){ ?>
                        <img src="http://localhost/jumei/<?php echo $data['logo'];?>" alt="" width="100" />
                        <a href="javascript:;" style="color:red;font-size:18px" id="close-logo">X</a>
                    <?php }else{ ?>
                        <input type="file" name="logo" id="" />
                    <?php } ?>
                </td>
                <td> </td>
            </tr>
            <script type="text/javascript">
                $('#close-logo').click(function() {
                    var input = '<input type="file" name="logo" id="" />';
                    $('#logo-td').html(input);
                    $('#logo-src').val('');
                });
            </script>
            <tr>
                <th class="w100">是否热门</th>
                <td>
                    是：<input type="radio" name="is_hot" id=""     <?php if($data['is_hot']){ ?>checked="checked<?php } ?>" value="1"/>
                    &nbsp;
                    否: <input type="radio" name="is_hot" id=""  value="0"     <?php if(!$data['is_hot']){ ?>checked="checked"<?php } ?>/>
                </td>
                <td></td>
            </tr>       
        </table>
        <div class="position-bottom">
            <input type="hidden" name="logo" value="<?php echo $data['logo'];?>" id="logo-src" />
            <input type="hidden" name="bid" value="<?php echo $data['bid'];?>" />
            <input type="submit" class="btn btn-primary" value="修改" style="margin-left:70px;margin-top:15px" />
        </div>
    </form>
</div>
</body>
</html>